package com.wanxi;

import com.wanxi.model.StudentModel;

import java.util.ArrayList;

public class SaveStudent {
    public static void main(String[] args) {
        ArrayList<StudentModel> studentModelArrayList = new ArrayList<>();
        studentModelArrayList.add(new StudentModel("张三", 23));
        studentModelArrayList.add(new StudentModel("张三", 23));
        studentModelArrayList.add(new StudentModel("张三", 23));
        studentModelArrayList.add(new StudentModel("张三", 23));
//        遍历集合 可以用foreach
        for (StudentModel model:studentModelArrayList
             ) {
            System.out.println(model);
        }
    }
}
